// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
/* jshint esversion: 6 */

import Vue from "vue";
import App from "./App";
import router from "./router"; // 导入路由文件
import axios from "axios";
import VueAxios from "vue-axios";
import "amfe-flexible";
import "lib-flexible/flexible";
import "lib-flexible";


import https from "./common/https";       //axios接口封装
import bus from "./common/Bus";       //axios接口封装
//引入封装好的js方法
import { _debounce, _throttle } from "./common/untils.js";

Vue.prototype.$https = https;//全局注册，使用方法为:this.$https
Vue.prototype.$bus = bus;//全局注册bus
Vue.prototype.$_debounce = _debounce;//全局注册，使用方法为:this.$https
Vue.prototype.$_throttle = _throttle;//全局注册，使用方法为:this.$https

Vue.prototype.$axios = axios;
import QS from "qs";
Vue.prototype.qs = QS;

Vue.use(VueAxios, axios);
// axios.defaults.baseURL = "/xcxapi"; //https://api.douban.com/v2/movie 改成/api才能用proxyTable跨域

import vantui from "./common/vant";
Vue.use(vantui);


Vue.config.productionTip = false;

/* eslint-disable no-new */
new Vue({
    el: "#app",
    router,
    components: {
        App
    },
    template: "<App/>"
});
